home *** CD-ROM | disk | FTP | other *** search
/ SuperHack / SuperHack CD.bin / Hack / MISC / SATAN~1.ZIP / SATAN~1.NOT
Encoding:
Text File  |  1997-01-04  |  20.4 KB  |  364 lines

  1.              U.S. DOE's Computer Incident Advisory Capability
  2.            ___  __ __    _     ___           __  __ __   __   __
  3.           /       |     /_\   /       |\ |  /  \   |    |_   /_
  4.           \___  __|__  /   \  \___    | \|  \__/   |    |__  __/
  5.  
  6. Number 95-07                                               March 29, 1995
  7.  
  8. In order to provide timely, useful information on the upcoming release
  9. of the SATAN tool, CIAC is releasing a special issue of CIAC
  10. Notes. Please send your comments and feedback to ciac@llnl.gov.
  11.  
  12.   $-$-$-$-$-$-$-$-$-$-$-$-$-$-$-$-$-$-$-$-$-$-$-$-$-$-$-$-$-$-$-$-$-$-$-$
  13.   $ Reference to any specific commercial product does not necessarily   $
  14.   $ constitute or imply its endorsement, recommendation or favoring by  $
  15.   $ CIAC, the University of California, or the United States Government.$
  16.   $-$-$-$-$-$-$-$-$-$-$-$-$-$-$-$-$-$-$-$-$-$-$-$-$-$-$-$-$-$-$-$-$-$-$-$
  17.  
  18.  
  19.  
  20. A Look at SATAN
  21. John Fisher
  22. CIAC Team
  23. ciac@llnl.gov
  24.  
  25.  
  26. Introduction
  27.  
  28. Security Administrator Tool for Analyzing Networks, or SATAN, is a
  29. tool for investigating the vulnerabilities of remote systems.
  30. Systematically moving through a given Internet subdomain, it
  31. probes for weakness in each responding system. The vulnerabilities
  32. uncovered are then reported to the user.
  33.  
  34. Due to be released April 5, SATAN is the joint work of Dan Farmer,
  35. author of COPS (Computer Oracle and Password System), and Wietse
  36. Venema, from the Eindhoven University of Technology in the
  37. Netherlands. This project is a private effort on their part, and the
  38. final product is to be freely available to anyone on the Internet.
  39.  
  40. Although it hasn't hit the Internet yet, SATAN is guaranteed to have a
  41. large impact on its security. SATAN is being promoted as a security
  42. tool for system administrators, not an attack tool for
  43. crackers. Unfortunately, it can be utilized in either manner. It is up
  44. to system administrators to decide what its impact will be. The safety
  45. of any particular system is dependent on who utilizes SATAN first.
  46.  
  47. Searching for system vulnerabilities is not a new idea. COPS will
  48. report many common vulnerabilities on a single system, by analyzing
  49. the system it resides on. Tools which probe for vulnerabilities on
  50. remote systems are not a new idea either. The Internet Security
  51. Scanner (ISS), written by Christopher Klaus, has been available in
  52. both public and commerical versions for several years. While it
  53. certainly simplified probing of remote systems, the public version was
  54. not particularly powerful. It lacked a user interface, and provided a
  55. limited set of attacks. In contrast, SATAN is considerably more
  56. powerful, and utilizes a World Wide Web (WWW) client to provide a
  57. friendly, point and click interface. Extensive information is provided
  58. that explains what vulnerabilities are being identified, and how those
  59. vulnerabilities can be removed.
  60.  
  61.  
  62. How It Works
  63.  
  64. All information provided here relates to version 0.33 of the beta
  65. release. SATAN is made up of HyperText Markup Language (HTML)
  66. documents, C code, and Perl scripts which generate HTML code
  67. dynamically. It requires an HTML viewer (Mosaic, Netscape, or Lynx), a
  68. C compiler, and PERL version 5. The user simply interacts with a WWW
  69. client, entering necessary data into forms. The control panel for
  70. SATAN provides four hypertext options: Target Selection, Reporting &
  71. Data Analysis, Documentation, and Configuration & Administration.
  72.  
  73. Through Target Selection, the user can enter a machine or a domain of
  74. machines to attack, and the extent of the attack (Light, Normal,
  75. Heavy). A Light attack will simply report what hosts are available,
  76. and what Remote Procedure Call (RPC) services they offer. A Normal
  77. attack will probe the targets by establishing finger, telnet, FTP,
  78. WWW, gopher, and SMTP connections. These will be used to establish
  79. what the operating system is, and what vulnerabilities may be
  80. available. A Heavy attack will additionally search for several other
  81. known vulnerabilities, such as writable anonymous ftp directories or
  82. trusted hosts.
  83.  
  84. Once the targets and extent of probing are established, a simple mouse
  85. click will begin the analysis. When finished, the user finds the
  86. results in the Reporting & Data Analysis link.
  87.  
  88. SATAN is highly customizable and extendible. Through configuration
  89. files, numerous default values can be modified. New probes to be
  90. performed on each host may be added by writing a program (or
  91. script) with the proper input and output, and naming it with an
  92. extension of ".satan." This will allow users to write their own
  93. attacks tools, and add them to SATAN in a plug-and-play manner.
  94.  
  95.  
  96. Protecting Against SATAN Attacks
  97.  
  98. By configuring a system correctly, installing all the latest patches,
  99. and monitoring system usage, most of SATAN's techniques can be
  100. countered, or at a minimum detected. Unfortunately, complete
  101. protection from SATAN is difficult. Most of the vulnerabilities it
  102. looks for are easily addressable, but some do not yet have
  103. satisfactory solutions.
  104.  
  105. Of course, the configuration problems should be addressed immediately,
  106. once uncovered. The more serious vulnerabilities may be addressed by
  107. stopping the vulnerable service, or placing a firewall around the
  108. vulnerable set of hosts.
  109.  
  110. Below is a summary of vulnerabilities that SATAN exploits, chiefly
  111. borrowed from the SATAN documentation itself. By effectively
  112. addressing these vulnerabilities, system administrators can prevent
  113. most attacks.
  114.  
  115. Unprivaleged NFS Access
  116.  
  117. NFS suffers from a poor authentication algorithm. The standard
  118. authentication mechanism it uses, AUTH_UNIX, uses a UID, GID pair to
  119. authorize that an NFS request is legitimate. But, NFS requests may be
  120. spoofed by user programs, fooling NFS into granting file access to
  121. arbitrary users. Although special authentication is done by AUTH_UNIX
  122. for root privileges to a filesystem, this may be obtained as well.
  123.  
  124. This is not an easy problem to fix. Of course, make sure that all NFS
  125. security patches have been installed. The best bet is to find a new
  126. implementation of NFS, one which supports DES encryption, and utilizes
  127. AUTH_DES authorization. A partial solution is to configure NFS so that
  128. requests are only accepted from privileged system programs (making
  129. spoofing more difficult). Then, a user must at least be root on a
  130. remote system in order to send NFS requests.
  131.  
  132. NFS file systems exported to arbitrary hosts
  133.  
  134. File systems exported under NFS should be mountable only by a
  135. restricted set of hosts. The UNIX "showmount" command will display
  136. filesystems exported by a given host:
  137.  
  138. %/usr/etc/showmount -e hostname
  139. export list for hostname:
  140. /usr hosta:hostb:hostc
  141. /usr/local (everyone)
  142.  
  143. The above output indicates that this NFS server is exporting two
  144. partitions: /usr, which can be mounted by hosta, hostb, and hostc; and
  145. /usr/local which can be mounted by anyone. In this case, access to the
  146. /usr/local partition should be restricted.
  147.  
  148. Whenever possible, file systems should be exported
  149. read-only. Regardless of the export privileges, a limited set of hosts
  150. should be explicitly defined in the /etc/exports file. A sample file
  151. might be as follows:
  152.  
  153. /usr            -ro,access=hosta.domain:hostb.domain
  154. /usr/local        -access=hosta.domain
  155.  
  156. Here, /usr is available for read-only access by hosta and hostb.
  157. /usr/local is available for read/write access, but only by
  158. hosta. Consult the system manual entry for "exports" or "NFS" for more
  159. information.
  160.  
  161. NFS file systems exported via the portmapper
  162.  
  163. On BSD systems, the portmap is used to convert TCP/IP protocol port
  164. numbers into RPC program numbers. A host can gain access to another
  165. host's file systems by tricking its portmapper into making NFS
  166. requests. Because NFS trusts the portmapper, one could gain access to
  167. an exported file system. Since most exported file systems are user
  168. home directories, this vulnerability can be used as a stepping stone
  169. to gaining root access.
  170.  
  171. Several steps can be taken to avoid this vulnerability. First, a
  172. portmapper should be used which does not forward mount requests, if
  173. the host is a BSD system. Wietse Venema has written a more secure
  174. portmapper, available at
  175. ftp://ftp.win.tue.nl/pub/security/portmap_3.shar.Z. For System V based
  176. systems, a similar tool has been written by Venema which is a
  177. replacement for rpcbind. It may be found at
  178. ftp://ftp.win.tue.nl/pub/security/rpcbind_1.1.tar.Z.
  179.  
  180. Second, more caution should be used when exporting file systems. File
  181. systems should be exported as read-only when possible, and an export
  182. list should not include the exporting server.
  183.  
  184. NIS password file access from arbitrary hosts
  185.  
  186. The NIS (Network Information Server) provides user information
  187. (including encrypted passwords) to other hosts on a
  188. network. Unfortunately, very little host authentication is performed,
  189. and it is easy for external hosts to obtain user passwords (and other
  190. information). A password cracker can then be used to obtain a login.
  191.  
  192. The best solution is to update NIS to provide some more complete
  193. access control mechanisms. Unfortunately, not all vendors are
  194. providing this yet. A portmapper with tighter access control
  195. mechanisms may work as well. Several patches for NIS running on SunOS
  196. are discussed in CIAC Bulletin C-25.
  197.  
  198. A strongly enforced policy for good passwords is probably as important
  199. as a secure NIS. Several passwd alternatives are available which
  200. require the user to enter more complex passwords, such as npasswd
  201. (ftp://ftp.cc.utexas.edu/pub/npasswd/npasswd.tar.Z).
  202.  
  203. REXD access from arbitrary hosts
  204.  
  205. The UNIX remote execute server rexd provides only minimal
  206. authentication and is easily subverted. It should be disabled by
  207. placing a "#" at the beginning of the rexd line in the file
  208. /etc/inetd.conf and then resetting the inetd process ("refresh -s
  209. inetd" on AIX systems, killing and restarting inetd on others). The
  210. disabled entry in /etc/inetd.conf should resemble the following:
  211.  
  212. #rexd/1 stream rcp/tcp wait root /usr/etc/rexd rexd
  213.  
  214. Arbitrary files accessible via TFTP
  215.  
  216. TFTP provides remote access to a host's files without asking for a
  217. password. While handy for booting diskless workstations, it is
  218. inherently a very dangerous security problem, and there is infrequent
  219. reason to use it. The best thing to do is to just disable completely,
  220. by placing a "#" at the beginning of the tftp line in
  221. /etc/inetd.conf. If that is not possible, only a limited portion of
  222. the file system should be available to TFTP users. This can be done by
  223. changing the root directory when the tftp daemon is executed. See the
  224. tftpd documentation for more details.
  225.  
  226. Remote shell access from arbitrary hosts
  227.  
  228. By entering a "+" in the /etc/hosts.equiv, or "+ +" in /.rhosts, a
  229. host can open itself up to the entire world. Anyone on the Internet
  230. can log in without being asked for a password. This of course should
  231. be avoided at all costs. Many systems are shipped in this manner, so
  232. be sure to check.
  233.  
  234. The package logdaemon provides replacements for rlogind, rshd,
  235. etc. They provide better handling of the hosts.equiv and .rhosts
  236. files, such as the rejection of wildcards. The package can be found at
  237. ftp://ftp.win.tue.nl/pub/security/logdaemon-4.7.tar.gz.
  238.  
  239. X server access control disabled
  240.  
  241. The X Windows client/server model is extremely powerful, but improper use
  242. of its capabilities can lead to serious security problems. If access
  243. control is disabled, via the "xhost +" command, any remote user will
  244. be able to read/write screen information, control I/O behavior, and
  245. even capture user keystrokes.
  246.  
  247. To avoid these problems, all "xhost +" commands should be removed from
  248. the .Xsession file, each user's .Xsession file, and any application
  249. program or shell script that may contain it. The ability to access a
  250. particular X server remotely should always be granted on a limited
  251. basis. The xhost program should really be avoided entirely. Instead,
  252. the xauth program should be used, using either MIT-MAGIC-COOKIE or
  253. SUN-DES authentication. See the xauth man pages for more details.
  254.  
  255. Writable anonymous FTP home directory
  256.  
  257. If the permissions are set incorrectly on the anonymous FTP home
  258. directory, any user may log in, and either add a .rhosts file (which
  259. could allow a shell session), or may be able to replace files.
  260.  
  261. The best way to avoid this problem is to have all system files and
  262. directories under the anonymous FTP home directory owned and writable
  263. solely by root. Making "/bin/false" the shell will have the additional
  264. effect of disallowing shell sessions with the ftp account.
  265.  
  266. For more information on securing anonymous FTP and other information
  267. servers, see the CIAC Document CIAC-2308 R.2
  268. (http://ciac.llnl.gov/ciac/documents/ciac2308.html).
  269.  
  270. The above information is fairly limited in details. The best source
  271. for understanding the vulnerabilities exploited by SATAN is SATAN
  272. itself. Every system administrator should read through the
  273. documentation it provides, and understand how to cover the holes it
  274. exploits.
  275.  
  276.  
  277. CIAC has recently written a program to defend against SATAN and other
  278. similar tools. The program, called Courtney, monitors the connections
  279. to the ports probed by SATAN. When an attack by SATAN takes place, the
  280. offending host will be reported. More information on this tool is
  281. available at http://ciac.llnl.gov/ciac/ToolsUnixNetMon.html#Courtney.
  282. Verify that the MD5 checksum of the compressed tar file has a value of
  283. 9fbc0142fdbe7911e63ae5905911e2c7.
  284.  
  285. CIAC offers several powerful tools to DOE and DOE contractors for
  286. inspecting UNIX based systems, and offering additional protection
  287. against SATAN. The Security Profile Inspector (SPI) provides a powerful
  288. suite of security inspections, using a straightforward menu-based
  289. interface. More information about SPI is available from
  290. http://ciac.llnl.gov/cstc/CSTCProducts.html#spi. The Network Intrusion
  291. Detector (NID) provides a suite of security tools for detecting and
  292. analyzing network intrusions. More information on it is available from
  293. http://ciac.llnl.gov/cstc/CSTCProducts.html#nid.
  294.  
  295.  
  296.  
  297. ------------------------------
  298. Who is CIAC?
  299.  
  300. CIAC is the U.S. Department of Energy's Computer Incident Advisory
  301. Capability. Established in 1989, shortly after the Internet Worm, CIAC
  302. provides various computer security services free of charge to
  303. employees and contractors of the DOE, such as:
  304.  
  305.     . Incident Handling Consulting 
  306.     . Computer Security Information 
  307.     . On-site Workshops
  308.     . White-hat Audits
  309.  
  310. CIAC is located at Lawrence Livermore National Laboratory in
  311. Livermore, California, and is a part of its Computer Security
  312. Technology Center. Further information can be found at CIAC. CIAC is
  313. also a founding member of FIRST, the Forum of Incident Response and
  314. Security Teams, a global organization established to foster
  315. cooperation and coordination among computer security teams
  316. worldwide. See FIRST for more details.
  317.  
  318.  
  319.  
  320. ------------------------------
  321. Contacting CIAC
  322.  
  323. DOE and DOE contractor sites can contact CIAC at:
  324.     Voice:   510-422-8193
  325.     FAX:     510-423-8002
  326.     STU-III: 510-423-2604
  327.     E-mail:  ciac@llnl.gov
  328.  
  329. For DOE and DOE contract site emergencies only, call 1-800-SKYPAGE
  330. (1-800-759-7243) and enter PIN number 8550070 (primary) or 8550074
  331. (secondary).
  332.  
  333. Previous CIAC notices, anti-virus software, and other information are
  334. available via WWW (http://ciac.llnl.gov/) and anonymous FTP from
  335. ciac.llnl.gov (IP address 128.115.19.53).
  336.  
  337. CIAC has several self-subscribing mailing lists for electronic
  338. publications:
  339.  
  340. 1. CIAC-BULLETIN for Advisories, highest priority - time critical
  341.    information and Bulletins, important computer security information;
  342.  
  343. 2. CIAC-NOTES for Notes, a collection of computer security articles;
  344.  
  345. 3. SPI-ANNOUNCE for official news about Security Profile Inspector
  346.    (SPI) software updates, new features, distribution and availability;
  347.  
  348. 4. SPI-NOTES, for discussion of problems and solutions regarding the
  349.    use of SPI products.
  350.  
  351. Our mailing lists are managed by a public domain software package
  352. called ListProcessor, which ignores E-mail header subject lines.  To
  353. subscribe (add yourself) to one of our mailing lists, send requests of
  354. the following form:
  355.  
  356.     subscribe list-name  LastName, FirstName PhoneNumber
  357.  
  358. as the E-mail message body, substituting CIAC-BULLETIN, CIAC-NOTES,
  359. SPI- ANNOUNCE or SPI-NOTES for list-name and valid information for
  360. LastName FirstName and PhoneNumber.  Send to: ciac-listproc@llnl.gov
  361. (not to: ciac@llnl.gov) e.g.,
  362.  
  363.     subscribe ciac-notes O'Hara, Scarlett W. 404-555-1212 x36
  364.     subscribe ciac-bulletin O'Hara, Scarlett